Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@alwatr/is-number
Advanced tools
A simple utility to Check the value is number or can convert to a number, for example string ' 123 ' can be converted to 123.
A simple utility to Check the value is number or can convert to a number, for example string ' 123 ' can be converted to 123.
yarn add @alwatr/is-number
import {isNumber} from '@alwatr/is-number';
isNumber('1'); // true
console.log(typeof '123'); //=> 'string'
console.log(+[]); //=> 0
console.log(+''); //=> 0
console.log(+' '); //=> 0
console.log(typeof NaN); //=> 'number'
console.log(typeof Infinity); //=> 'number'
isNumber(5e3); // true
isNumber(0xff); // true
isNumber(-1.1); // true
isNumber(0); // true
isNumber(1); // true
isNumber(1.1); // true
isNumber('-1.1'); // true
isNumber('0'); // true
isNumber('0xff'); // true
isNumber('1'); // true
isNumber('1.1'); // true
isNumber('5e3'); // true
isNumber('012'); // true
isNumber(parseInt('012')); // true
isNumber(parseFloat('012')); // true
isNumber(Infinity); // false
isNumber(NaN); // false
isNumber(null); // false
isNumber(undefined); // false
isNumber(''); // false
isNumber(' '); // false
isNumber('foo'); // false
isNumber([1]); // false
isNumber([]); // false
isNumber(function () {}); // false
isNumber({}); // false
The following companies, organizations, and individuals support Nanolib ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.
Contributions are welcome! Please read our contribution guidelines before submitting a pull request.
This project is licensed under the AGPL-3.0 License.
5.0.0 (2024-11-02)
optional
Co-authored-by: Ali Mihandoost ali@mihandoost.com
get-env-value
package (b2a89e1) by @http-utils
package (8fd5e78) by @resolve-url
package (a884212) by @package-tracer
(f570030) by @definePackage
to use deduplicate
for backward compatibility (990b994) by @@alwatr/util
(4cc22ed) by @weaver
configs(--preset=weaver
) (1bae458) by @__package_name__
(d071d0b) by @global-this
(97aa2d0) by @nanolib
package to export the common packages (1610b1e) by @http-utils
(ab816d2) by @node
packages from their files (e039a2f) by @resolve-url
from nanolib
package (ea40407) by @dedupe
package (10c5ffc) by @get-env-package
(0e9e492) by @@alwatr/math
(f5e32d0) by @render-state
package (7f5b112) by @unicode-digits
package (2ee138e) by @packageTracer
(425e3f9) by @package-tracer
(cc3c5f9) by @import
& use __package_name__
(1ebbe92) by @demo
based on new API (650f159) by @microservice
preset (e5e4826) by @mangleProps
temporary (65d95cc) by @unicode-digits
& update its deps (28a6a65) by @preset
option of nano-build
to module3
(2d49433) by @exports
key for new files (0e9f4aa) by @prototype
to check exactly (15dfb6e) by @README
(ea2513a) by @interface
to type
(c9e6970) by @global-this
package & remove global type (63f5a3b) by @global-this
package & remove global type & prevent sidee-ffects (092d448) by @dedupe
anymore (e6c3ce9) by @global-this
& update exports
key in package.json
(42c8081) by @function
s & improve the code style (207af08) by @global-this
package (42510b9) by @eslint-plugin-require-extensions
to peerDependencies (77d0468) by @include: scope
from commit-message configuration (8786590) by @import
s & test the result of build
(7ba474f) by @FAQs
A simple utility to Check the value is number or can convert to a number, for example string ' 123 ' can be converted to 123.
The npm package @alwatr/is-number receives a total of 137 weekly downloads. As such, @alwatr/is-number popularity was classified as not popular.
We found that @alwatr/is-number demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.